<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
<div class="table-responsive">
    <table class="table table-bordered">
        <thead>
        <tr>
            <th class="text-center"><div class="table-first-id">ID</div></th>
            <th class="text-center" width="15%">商品名称</th>
            <th class="text-center" width="10%">形态</th>
            <th class="text-center" width="8%">消耗积分</th>
            <th class="text-center" width="8%">库存</th>
            <th class="text-center" width="8%">兑换人数</th>
            <th class="text-center" width="8%">未发货数</th>
            <th class="text-center" width="10%">创建时间</th>
            <th class="text-center" width="6%">状态</th>
            <th class="text-center" width="20%">操作</th>
        </tr>
    </table>
    <div class="J_V_tabContent table-xScrollWrap">
        <table class="table table-bordered table-hover table-xs-content">
            <tbody>
            <tr class="jqgfirstrow" role="row">
                <td class="text-center"><div class="table-first-id">&nbsp;</div></td>
                <th class="text-center" width="15%"></th>
                <th class="text-center" width="10%"></th>
                <th class="text-center" width="8%"></th>
                <th class="text-center" width="8%"></th>
                <th class="text-center" width="8%"></th>
                <th class="text-center" width="8%"></th>
                <th class="text-center" width="10%"></th>
                <th class="text-center" width="6%"></th>
                <th class="text-center" width="20%"></th>
            </tr>
            <tr th:if="${#lists.isEmpty(dataMap['list'])}">
                <td colspan="10" class="text-center">
                    <div class="noDataTipsBox">
                        <p><span class="c-4e fs16">亲，还没有数据~~~</span></p>
                    </div>
                </td>
            </tr>
            <tr th:if="!${#lists.isEmpty(dataMap['list'])}" th:each="entity : ${dataMap['list']}" th:attrappend="id='entity-open-'+${entity['id']}">
                <td class="text-center">
                    <input type="checkbox" class="i-checks" name="courseOpenId" th:value="${entity['id']}" />
                </td>
                <td class="text-center" th:text="${entity['name']}"> </td>
                <td class="text-center">
                    <span th:if="${entity['type']}==1" class="c-red">实体商品</span>
                    <span th:if="${entity['type']}==2" class="c-green">虚拟商品</span>
                </td>
                <td class="text-center" th:text="${entity['integral']}">
                </td>
                <td class="text-center" th:text="${entity['inventory']}">
                </td>
                <td class="text-center" th:text="${entity['exchangeNum']}">
                </td>
                <td class="text-center">
                    <span th:if="${entity['type']}==1" th:text="${entity['notDeliverNum']}"></span>
                    <span th:if="${entity['type']}==2">-</span>
                </td>
                <td class="text-center" th:text="${entity['createTime']}">
                </td>
                <td class="text-center" th:attrappend="id='status-'+${entity['id']},data-id=${entity['id']}">
                    <span th:if="${entity['status']}==1" class="label label-default">未上架</span>
                    <span th:if="${entity['status']}==2" class="label label-danger">已下架</span>
                    <span th:if="${entity['status']}==3" class="label label-info ">已上架</span>
                </td>
                <td class="text-center">
                    <a href="javascript:void(0);" class="c-master fs14 ml5 opneInFo" th:attrappend="data-id=${entity['id']}" data-toggle="tooltip" data-placement="bottom" data-original-title="查看">
                      查看
                    </a>
                    <a th:href="@{/admin/IntegralGood/initUpdateGood?id={id}(id=${entity['id']})}" class="c-master fs14 ml5" th:attrappend="data-id=${entity['id']}" data-toggle="tooltip" data-placement="bottom" data-original-title="编辑">
                       编辑
                    </a>
                    <a th:if="${entity['status']}==1 or ${entity['status']}==2 " th:attrappend="id='status-action-'+${entity['id']},data-id=${entity['id']}" href="javascript:void(0);"  class="c-master fs14 ml5 theShelves" data-toggle="tooltip" data-placement="bottom" data-original-title="上架">
                      上架
                    </a>
                    <a th:if="${entity['status']}==3" th:attrappend="id='status-action-'+${entity['id']},data-id=${entity['id']}" href="javascript:void(0);"  class="c-master fs14 ml5  shelves" data-toggle="tooltip" data-placement="bottom" data-original-title="下架">
                        下架
                    </a>
                    <a th:if="${entity['status']}!=4" th:attrappend="id='del-action-'+${entity['id']},data-id=${entity['id']}" href="javascript:void(0);"  class="c-master fs14 ml5 del" data-toggle="tooltip" data-placement="bottom" data-original-title="删除">
                       删除
                    </a>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
    <!-- 分页，开始 -->
    <div data-th-replace="layout/adminPage"></div>
    <!-- 分页，结束 -->
</div>
</html>
